<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #outer{
            width:200px;
            height:200px;
            background-color: lightgreen;
        }
        #inner{
            width:100px;
            height:100px;
            background-color: lightcoral;
        }
    </style>
</head>
<body>
    <div id="outer">
        <div id="inner"></div>
    </div>
    <script>
        let outer = document.getElementById('outer');
        let inner = document.getElementById('inner');
        outer.addEventListener('mouseenter',function(event){
            console.log('outer mouseenter');
        });
        outer.addEventListener('mouseleave',function(event){
            console.log('outer mouseleave');
        });
        inner.addEventListener('mouseenter',function(event){
            console.log('inner mouseenter');
        });
        inner.addEventListener('mouseout',function(event){
            console.log('inner mouseleave');
        });
    </script>
</body>
</html>